]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: Support OSK layout modes explicitly
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 29 Jan 2024 14:44:38 +0000 (15:44 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 29 Feb 2024 15:42:22 +0000 (16:42 +0100)
We only support "latched" which stays toggled on for a single
character unless long-pressed. Support "default" mode explicitly
to switch back to the default level, leaving "locked" implicitly
supported as the way to stay in the same level.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3162>

js/ui/keyboard.js

index 1dc369ff1a511b81fff640cbc0eb80a90979257e..fe9db59c77035f87588b2b8291c9585e19664d97 100644 (file)
@@ -1440,7 +1440,8 @@ export const Keyboard = GObject.registerClass({
             if (key.action !== 'modifier') {
                 button.connect('commit', (_actor, keyval, str) => {
                     this._commitAction(keyval, str).then(() => {
-                        if (layout.mode === 'latched' && !this._latched)
+                        if (layout.mode === 'default' ||
+                            (layout.mode === 'latched' && !this._latched))
                             this._setActiveLevel('default');
                     });
                 });